﻿using System;
using System.Collections.Generic;
using Microsoft.Xna.Framework;

namespace LevelEditor
{
    public class NoiseMap
    {
        private float[,] Map;

        public float WidthActuall
        {
            get { return Map.GetLength(0); }
        }
        public float HeightActuall
        {
            get { return Map.GetLength(1); }
        }
        public float WidthScale, HeightScale;

        public NoiseMap(float[,] Map)
        {
            this.Map = Map;
            WidthScale = Map.GetLength(0);
            HeightScale = Map.GetLength(1);
        }

        public float this[int x, int y]
        {
            get 
            {
                int xat = (int)(x * (WidthActuall / WidthScale));
                int yat = (int)(y * (HeightActuall / HeightScale));
                return Map[xat, yat];
            }
        }
    }
}